<html>
 <head>
  <meta charset="utf-8"/>
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport"/>
  <title>
   GC调优在Spark应用中的实践  | 数螺 | NAUT IDEA
  </title>
  <link href="http://cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" rel="stylesheet"/>
  <link href="http://cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/>
  <style type="text/css">
   #xmain img {
                  max-width: 100%;
                  display: block;
                  margin-top: 10px;
                  margin-bottom: 10px;
                }

                #xmain p {
                    line-height:150%;
                    font-size: 16px;
                    margin-top: 20px;
                }

                #xmain h2 {
                    font-size: 24px;
                }

                #xmain h3 {
                    font-size: 20px;
                }

                #xmain h4 {
                    font-size: 18px;
                }


                .header {
	           background-color: #0099ff;
	           color: #ffffff;
	           margin-bottom: 20px;
	        }

	        .header p {
                  margin: 0px;
                  padding: 10px 0;
                  display: inline-block;  
                  vertical-align: middle;
                  font-size: 16px;
               }

               .header a {
                 color: white;
               }

              .header img {
                 height: 25px;
              }
  </style>
  <script src="http://cdn.bootcss.com/jquery/3.0.0/jquery.min.js">
  </script>
  <script src="http://nautstatic-10007657.file.myqcloud.com/static/css/readability.min.js" type="text/javascript">
  </script>
  <script type="text/javascript">
   $(document).ready(function() {
                 var loc = document.location;
                 var uri = {
                  spec: "http://dataunion.org/19227.html",
                  host: "http://dataunion.org",
                  prePath: "http://dataunion.org",
                  scheme: "http",
                  pathBase: "http://dataunion.org/"
                 };
    
                 var documentClone = document.cloneNode(true);
                 var article = new Readability(uri, documentClone).parse();
     
                 document.getElementById("xmain").innerHTML = article.content;
                });
  </script>
  <!-- 1466461344: Accept with keywords: (title(0.5):Spark,调优,数盟,社区, topn(0.2):程序运行,数盟,流式,数据挖掘,吞吐量,时间,内存,空间,拷贝到,分区,效率,参数,计算,文章,日志,数据,收集器,对象,性能,内存空间,用户,问题,调优,Spark,部分,程序,线程,垃圾,大量,区块).-->
 </head>
 <body onload="">
  <div class="header">
   <div class="container">
    <div class="row">
     <div class="col-xs-6 col-sm-6 text-left">
      <a href="/databee">
       <img src="http://nautidea-10007657.cos.myqcloud.com/logo_white.png"/>
      </a>
      <a href="/databee">
       <p>
        数螺
       </p>
      </a>
     </div>
     <div class="hidden-xs col-sm-6 text-right">
      <p>
       致力于数据科学的推广和知识传播
      </p>
     </div>
    </div>
   </div>
  </div>
  <div class="container text-center">
   <h1>
    GC调优在Spark应用中的实践
   </h1>
  </div>
  <div class="container" id="xmain">
   ﻿﻿
   <title>
    GC调优在Spark应用中的实践 | 数盟社区
   </title>
   <!-- All in One SEO Pack 2.2.7.6.2 by Michael Torbert of Semper Fi Web Design[32,63] -->
   <!-- /all in one seo pack -->
   <!--
<div align="center">
<a href="http://strata.oreilly.com.cn/hadoop-big-data-cn?cmp=mp-data-confreg-home-stcn16_dataunion_pc" target="_blank"><img src="http://dataunion.org/wp-content/uploads/2016/05/stratabj.jpg"/ ></a>
</div>
-->
   <header id="header-web">
    <div class="header-main">
     <hgroup class="logo">
      <h1>
       <a href="http://dataunion.org/" rel="home" title="数盟社区">
        <img src="http://dataunion.org/wp-content/themes/yzipi/images/logo.png"/>
       </a>
      </h1>
     </hgroup>
     <!--logo-->
     <nav class="header-nav">
      <ul class="menu" id="menu-%e4%b8%bb%e8%8f%9c%e5%8d%95">
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children menu-item-71" id="menu-item-71">
        <a href="http://dataunion.org/category/events" title="events">
         活动
        </a>
        <ul class="sub-menu">
         <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-22457" id="menu-item-22457">
          <a href="http://dataunion.org/2016timeline">
           2016档期
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-22459" id="menu-item-22459">
          <a href="http://dataunion.org/category/parterc">
           合作会议
          </a>
         </li>
        </ul>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category current-post-ancestor current-menu-parent current-post-parent menu-item-has-children menu-item-20869" id="menu-item-20869">
        <a href="http://dataunion.org/category/tech" title="articles">
         文章
        </a>
        <ul class="sub-menu">
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-20867" id="menu-item-20867">
          <a href="http://dataunion.org/category/tech/base" title="base">
           基础架构
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3302" id="menu-item-3302">
          <a href="http://dataunion.org/category/tech/ai" title="ai">
           人工智能
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3303" id="menu-item-3303">
          <a href="http://dataunion.org/category/tech/analysis" title="analysis">
           数据分析
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-21920" id="menu-item-21920">
          <a href="http://dataunion.org/category/tech/dm">
           数据挖掘
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3314" id="menu-item-3314">
          <a href="http://dataunion.org/category/tech/viz" title="viz">
           可视化
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3305" id="menu-item-3305">
          <a href="http://dataunion.org/category/tech/devl" title="devl">
           编程语言
          </a>
         </li>
        </ul>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children menu-item-20876" id="menu-item-20876">
        <a href="http://dataunion.org/category/industry">
         行业
        </a>
        <ul class="sub-menu">
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-16328" id="menu-item-16328">
          <a href="http://dataunion.org/category/industry/case" title="case">
           行业应用
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-2112" id="menu-item-2112">
          <a href="http://dataunion.org/category/industry/demo" title="demo">
           Demo展示
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-21562" id="menu-item-21562">
          <a href="http://dataunion.org/category/industry/news">
           行业资讯
          </a>
         </li>
        </ul>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-311" id="menu-item-311">
        <a href="http://dataunion.org/category/sources" title="sources">
         资源
        </a>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-20870" id="menu-item-20870">
        <a href="http://dataunion.org/category/books" title="book">
         图书
        </a>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-21363" id="menu-item-21363">
        <a href="http://dataunion.org/category/training">
         课程
        </a>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children menu-item-21853" id="menu-item-21853">
        <a href="http://dataunion.org/category/jobs">
         职位
        </a>
        <ul class="sub-menu">
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-22050" id="menu-item-22050">
          <a href="http://dataunion.org/category/career">
           职业规划
          </a>
         </li>
        </ul>
       </li>
      </ul>
     </nav>
     <!--header-nav-->
    </div>
   </header>
   <!--header-web-->
   <div id="main">
    <div id="soutab">
     <form action="http://dataunion.org/" class="search" method="get">
     </form>
    </div>
    <div id="container">
     <nav id="mbx">
      当前位置：
      <a href="http://dataunion.org">
       首页
      </a>
      &gt;
      <a href="http://dataunion.org/category/tech">
       文章
      </a>
      &gt;  正文
     </nav>
     <!--mbx-->
     <article class="content">
      <header align="centre" class="contenttitle">
       <div class="mscc">
        <h1 class="mscctitle">
         <a href="http://dataunion.org/19227.html">
          GC调优在Spark应用中的实践
         </a>
        </h1>
        <address class="msccaddress ">
         <em>
          2,930 次阅读 -
         </em>
         <a href="http://dataunion.org/category/tech" rel="category tag">
          文章
         </a>
        </address>
       </div>
      </header>
      <div class="content-text">
       <blockquote>
        <div class="summary">
         作者：
         <span class="ago">
          仲浩   出处：《程序员》电子刊5月B
         </span>
        </div>
       </blockquote>
       <div class="summary">
       </div>
       <div class="summary">
        <strong>
         摘要：
        </strong>
        Spark立足内存计算，常常需要在内存中存放大量数据，因此也更依赖JVM的垃圾回收机制。与此同时，它也兼容批处理和流式处理，对于程序吞吐量和延迟都有较高要求，因此GC参数的调优在Spark应用实践中显得尤为重要。
       </div>
       <div class="con news_content">
        <p>
         Spark是时下非常热门的大数据计算框架，以其卓越的性能优势、独特的架构、易用的用户接口和丰富的分析计算库，正在工业界获得越来越广泛的应用。与Hadoop、HBase生态圈的众多项目一样，Spark的运行离不开JVM的支持。由于Spark立足于内存计算，常常需要在内存中存放大量数据，因此也更依赖JVM的垃圾回收机制（GC）。并且同时，它也支持兼容批处理和流式处理，对于程序吞吐量和延迟都有较高要求，因此GC参数的调优在Spark应用实践中显得尤为重要。本文主要讲述如何针对Spark应用程序配置JVM的垃圾回收器，并从实际案例出发，剖析如何进行GC调优，进一步提升Spark应用的性能。
        </p>
        <h3>
         问题介绍
        </h3>
        <p>
         随着Spark在工业界得到广泛使用，Spark应用稳定性以及性能调优问题不可避免地引起了用户的关注。由于Spark的特色在于内存计算，我们在部署Spark集群时，动辄使用超过100GB的内存作为Heap空间，这在传统的Java应用中是比较少见的。在广泛的合作过程中，确实有很多用户向我们抱怨运行Spark应用时GC所带来的各种问题。例如垃圾回收时间久、程序长时间无响应，甚至造成程序崩溃或者作业失败。对此，我们该怎样调试Spark应用的垃圾收集器呢？在本文中，我们从应用实例出发，结合具体问题场景，探讨了Spark应用的GC调优方法。
        </p>
        <p>
         按照经验来说，当我们配置垃圾收集器时，主要有两种策略——Parallel GC和CMS GC。前者注重更高的吞吐量，而后者则注重更低的延迟。两者似乎是鱼和熊掌，不能兼得。在实际应用中，我们只能根据应用对性能瓶颈的侧重性，来选取合适的垃圾收集器。例如，当我们运行需要有实时响应的场景的应用时，我们一般选用CMS GC，而运行一些离线分析程序时，则选用Parallel GC。那么对于Spark这种既支持流式计算，又支持传统的批处理运算的计算框架来说，是否存在一组通用的配置选项呢？
        </p>
        <p>
         通常CMS GC是企业比较常用的GC配置方案，并在长期实践中取得了比较好的效果。例如对于进程中若存在大量寿命较长的对象，Parallel GC经常带来较大的性能下降。因此，即使是批处理的程序也能从CMS GC中获益。不过，在从1.6开始的HOTSPOT JVM中，我们发现了一个新的GC设置项：Garbage-First GC(G1 GC)。Oracle将其定位为CMS GC的长期演进，这让我们重燃了鱼与熊掌兼得的希望！那么，我们首先了解一下GC的一些相关原理吧。
        </p>
        <h3>
         GC算法原理
        </h3>
        <p>
         在传统JVM内存管理中，我们把Heap空间分为Young/Old两个分区，Young分区又包括一个Eden和两个Survivor分区，如图1所示。新产生的对象首先会被存放在Eden区，而每次minor GC发生时，JVM一方面将Eden分区内存活的对象拷贝到一个空的Survivor分区，另一方面将另一个正在被使用的Survivor分区中的存活对象也拷贝到空的Survivor分区内。在此过程中，JVM始终保持一个Survivor分区处于全空的状态。一个对象在两个Survivor之间的拷贝到一定次数后，如果还是存活的，就将其拷入Old分区。当Old分区没有足够空间时，GC会停下所有程序线程，进行Full GC，即对Old区中的对象进行整理。这个所有线程都暂停的阶段被称为Stop-The-World(STW)，也是大多数GC算法中对性能影响最大的部分。
        </p>
        <p>
         <img src="http://dataunion.org/wp-content/uploads/2015/06/556d3de6bb8c71.jpg"/>
        </p>
        <p>
         <b>
          图 1 分年代的Heap结构
         </b>
        </p>
        <p>
         而G1 GC则完全改变了这一传统思路。它将整个Heap分为若干个预先设定的小区域块（如图2），每个区域块内部不再进行新旧分区， 而是将整个区域块标记为Eden/Survivor/Old。当创建新对象时，它首先被存放到某一个可用区块（Region）中。当该区块满了，JVM就会创建新的区块存放对象。当发生minor GC时，JVM将一个或几个区块中存活的对象拷贝到一个新的区块中，并在空余的空间中选择几个全新区块作为新的Eden分区。当所有区域中都有存活对象，找不到全空区块时，才发生Full GC。而在标记存活对象时，G1使用RememberSet的概念，将每个分区外指向分区内的引用记录在该分区的RememberSet中，避免了对整个Heap的扫描，使得各个分区的GC更加独立。在这样的背景下，我们可以看出G1 GC大大提高了触发Full GC时的Heap占用率，同时也使得Minor GC的暂停时间更加可控，对于内存较大的环境非常友好。这些颠覆性的改变，将给GC性能带来怎样的变化呢？最简单的方式，我们可以将老的GC设置直接迁移为G1 GC，然后观察性能变化。
        </p>
        <p>
         <img src="http://dataunion.org/wp-content/uploads/2015/06/556d3e2e9d1a11.jpg"/>
        </p>
        <p>
         <b>
          图 2 G1 Heap结构示意
         </b>
        </p>
        <p>
         由于G1取消了对于heap空间不同新旧对象固定分区的概念，所以我们需要在GC配置选项上作相应的调整，使得应用能够合理地运行在G1 GC收集器上。一般来说，对于原运行在Parallel GC上的应用，需要去除的参数包括-Xmn, -XX:-UseAdaptiveSizePolicy, -XX:SurvivorRatio=n等；而对于原来使用CMS GC的应用，我们需要去掉-Xmn -XX:InitialSurvivorRatio -XX:SurvivorRatio -XX:InitialTenuringThreshold -XX:MaxTenuringThreshold等参数。另外在CMS中已经调优过的-XX:ParallelGCThreads -XX:ConcGCThreads参数最好也移除掉，因为对于CMS来说性能最好的不一定是对于G1性能最好的选择。我们先统一置为默认值，方便后期调优。此外，当应用开启的线程较多时，最好使用-XX:-ResizePLAB来关闭PLAB()的大小调整，以避免大量的线程通信所导致的性能下降。
        </p>
        <p>
         关于Hotspot JVM所支持的完整的GC参数列表，可以使用参数-XX:+PrintFlagsFinal打印出来，也可以参见Oracle官方的文档中对部分参数的解释。
        </p>
        <h3>
         Spark的内存管理
        </h3>
        <p>
         Spark的核心概念是RDD，实际运行中内存消耗都与RDD密切相关。Spark允许用户将应用中重复使用的RDD数据持久化缓存起来，从而避免反复计算的开销，而RDD的持久化形态之一就是将全部或者部分数据缓存在JVM的Heap中。Spark Executor会将JVM的heap空间大致分为两个部分，一部分用来存放Spark应用中持久化到内存中的RDD数据，剩下的部分则用来作为JVM运行时的堆空间，负责RDD转化等过程中的内存消耗。我们可以通过spark.storage.memoryFraction参数调节这两块内存的比例，Spark会控制缓存RDD总大小不超过heap空间体积乘以这个参数所设置的值，而这块缓存RDD的空间中没有使用的部分也可以为JVM运行时所用。因此，分析Spark应用GC问题时应当分别分析两部分内存的使用情况。
        </p>
        <p>
         而当我们观察到GC延迟影响效率时，应当先检查Spark应用本身是否有效利用有限的内存空间。RDD占用的内存空间比较少的话，程序运行的heap空间也会比较宽松，GC效率也会相应提高；而RDD如果占用大量空间的话，则会带来巨大的性能损失。下面我们从一个用户案例展开：
        </p>
        <p>
         该应用是利用Spark的组件Bagel来实现的，其本质就是一个简单的迭代计算。而每次迭代计算依赖于上一次的迭代结果，因此每次迭代结果都会被主动持续化到内存空间中。当运行用户程序时，我们观察到随着迭代次数的增加，进程占用的内存空间不断快速增长，GC问题越来越突出。但是，仔细分析Bagel实现机制，我们很快发现Bagel将每次迭代产生的RDD都持久化下来了，而没有及时释放掉不再使用的RDD，从而造成了内存空间不断增长，触发了更多GC执行。经过简单的修改，我们修复了这个问题（SPARK-2661）。应用的内存空间得到了有效的控制后，迭代次数三次以后RDD大小趋于稳定，缓存空间得到有效控制（如表1所示），GC效率得以大大提高，程序总的运行时间缩短了10%~20%。
        </p>
        <p>
         <img src="http://dataunion.org/wp-content/uploads/2015/06/556d3e745737e1.jpg"/>
        </p>
        <p>
         <b>
          小结：
         </b>
         当观察到GC频繁或者延时长的情况，也可能是Spark进程或者应用中内存空间没有有效利用。所以可以尝试检查是否存在RDD持久化后未得到及时释放等情况。
        </p>
        <h3>
         选择垃圾收集器
        </h3>
        <p>
         在解决了应用本身的问题之后，我们就要开始针对Spark应用的GC调优了。基于修复了SPARK-2661的Spark版本，我们搭建了一个4个节点的集群，给每个Executor分配88G的Heap，在Spark的Standalone模式下来进行我们的实验。在使用默认的Parallel GC运行我们的Spark应用时，我们发现，由于Spark应用对于内存的开销比较大，而且大部分对象并不能在一个较短的生命周期中被回收，Parallel GC也常常受困于Full GC，而每次Full GC都给性能带来了较大的下降。而Parallel GC可以进行参数调优的空间也非常有限，我们只能通过调节一些基本参数来提高性能，如各年代分区大小比例、进入老年代前的拷贝次数等。而且这些调优策略只能推迟Full GC的到来，如果是长期运行的应用，Parallel GC调优的意义就非常有限了。因此，本文中不会再对Parallel GC进行调优。表2列出了Parallel GC的运行情况，其中CPU利用率较低的部分正是发生Full GC的时候。
        </p>
        <table class="table">
         <tbody>
          <tr>
           <td>
            <b>
             Configuration Options
            </b>
           </td>
           <td>
            <code>
             -XX:+UseParallelGC -XX:+UseParallelOldGC -XX:+PrintFlagsFinal -XX:+PrintReferenceGC -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintAdaptiveSizePolicy -Xms88g -Xmx88g
            </code>
           </td>
          </tr>
          <tr>
           <td>
            <b>
             Stage*
            </b>
           </td>
           <td>
            <img src="http://dataunion.org/wp-content/uploads/2015/06/Screen-Shot-2015-05-26-at-1.42.13-PM11.png"/>
           </td>
          </tr>
          <tr>
           <td>
            <b>
             Task*
            </b>
           </td>
           <td>
            <img src="http://dataunion.org/wp-content/uploads/2015/06/Screen-Shot-2015-05-26-at-1.56.05-PM1.png"/>
           </td>
          </tr>
          <tr>
           <td>
            <b>
             CPU*
            </b>
           </td>
           <td>
            <img src="http://dataunion.org/wp-content/uploads/2015/06/Screen-Shot-2015-05-26-at-1.57.56-PM1.png"/>
           </td>
          </tr>
          <tr>
           <td>
            <b>
             Mem*
            </b>
           </td>
           <td>
            <img src="http://dataunion.org/wp-content/uploads/2015/06/Screen-Shot-2015-05-26-at-2.00.31-PM1.png"/>
           </td>
          </tr>
         </tbody>
        </table>
        <p>
         <b>
          Parallel GC运行情况(未调优)
         </b>
        </p>
        <p>
         至于CMS GC，也没有办法消除这个Spark应用中的Full GC，而且CMS的Full GC的暂停时间远远超过了Parallel GC，大大拖累了该应用的吞吐量。
        </p>
        <p>
         接下来，我们就使用最基本的G1 GC配置来运行我们的应用。实验结果发现，G1 GC竟然也出现了不可忍受的Full GC（表3的CPU利用率图中，可以明显发现Job 3中出现了将近100秒的暂停），超长的暂停时间大大拖累了整个应用的运行。如表4所示，虽然总的运行时间比Parallel GC略长，不过G1 GC表现略好于CMS GC。
        </p>
        <table class="table">
         <tbody>
          <tr>
           <td>
            <b>
             Configuration Options
            </b>
           </td>
           <td>
            -XX:+UseG1GC -XX:+PrintFlagsFinal -XX:+PrintReferenceGC -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintAdaptiveSizePolicy -XX:+UnlockDiagnosticVMOptions -XX:+G1SummarizeConcMark -Xms88g -Xmx88g
           </td>
          </tr>
          <tr>
           <td>
            <b>
             Stage*
            </b>
           </td>
           <td>
            <img src="http://dataunion.org/wp-content/uploads/2015/06/Screen-Shot-2015-05-26-at-3.02.59-PM1.png"/>
           </td>
          </tr>
          <tr>
           <td>
            <b>
             Task*
            </b>
           </td>
           <td>
            <img src="http://dataunion.org/wp-content/uploads/2015/06/Screen-Shot-2015-05-26-at-3.03.42-PM1.png"/>
           </td>
          </tr>
          <tr>
           <td>
            <b>
             CPU*
            </b>
           </td>
           <td>
            <img src="http://dataunion.org/wp-content/uploads/2015/06/Screen-Shot-2015-05-26-at-3.04.24-PM.png"/>
           </td>
          </tr>
          <tr>
           <td>
            <b>
             Mem*
            </b>
           </td>
           <td>
            <img src="http://dataunion.org/wp-content/uploads/2015/06/Screen-Shot-2015-05-26-at-3.05.59-PM.png"/>
           </td>
          </tr>
         </tbody>
        </table>
        <p>
         <b>
          表 3 G1 GC运行情况(未调优)
         </b>
        </p>
        <p>
         <img src="http://dataunion.org/wp-content/uploads/2015/06/556d41bf769fb.jpg"/>
        </p>
        <p>
         <b>
          表 4 三种垃圾收集器对应的程序运行时间比较（88GB heap未调优）
         </b>
        </p>
        <h3>
         根据日志进一步调优
        </h3>
        <p>
         在让G1 GC跑起来之后，我们下一步就是需要根据GC log，来进一步进行性能调优。首先，我们要让JVM记录比较详细的GC日志. 对于Spark而言，我们需要在SPARK_JAVA_OPTS中设置参数使得Spark保留下我们需要用到的日志. 一般而言，我们需要设置这样一串参数：
        </p>
        <blockquote>
         <p>
          -XX:+PrintFlagsFinal -XX:+PrintReferenceGC -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintAdaptiveSizePolicy -XX:+UnlockDiagnosticVMOptions -XX:+G1SummarizeConcMark
         </p>
        </blockquote>
        <p>
         有了这些参数，我们就可以在SPARK的EXECUTOR日志中（默认输出到各worker节点的$SPARK_HOME/work/$app_id/$executor_id/stdout中）读到详尽的GC日志以及生效的GC 参数了。接下来，我们就可以根据GC日志来分析问题，使程序获得更优性能。我们先来了解一下G1中一次GC的日志结构。
        </p>
        <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
        <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57686c9c96979838270019" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
         <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <span class="crayon-title">
          </span>
          <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
           <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-wrap-button" title="切换自动换行">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-expand-button" title="点击展开代码">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-copy-button" title="复制代码">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
            <div class="crayon-button-icon">
            </div>
           </div>
          </div>
         </div>
         <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
         </div>
         <div class="crayon-plain-wrap">
          <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
           251.354: [G1Ergonomics (Mixed GCs) continue mixed GCs, reason: candidate old regions available, candidate old regions: 363 regions, reclaimable: 9830652576 bytes (10.40 %), threshold: 10.00 %]

[Parallel Time: 145.1 ms, GC Workers: 23]

[GC Worker Start (ms): Min: 251176.0, Avg: 251176.4, Max: 251176.7, Diff: 0.7]

[Ext Root Scanning (ms): Min: 0.8, Avg: 1.2, Max: 1.7, Diff: 0.9, Sum: 28.1]

[Update RS (ms): Min: 0.0, Avg: 0.3, Max: 0.6, Diff: 0.6, Sum: 5.8]

[Processed Buffers: Min: 0, Avg: 1.6, Max: 9, Diff: 9, Sum: 37]

[Scan RS (ms): Min: 6.0, Avg: 6.2, Max: 6.3, Diff: 0.3, Sum: 143.0]

[Object Copy (ms): Min: 136.2, Avg: 136.3, Max: 136.4, Diff: 0.3, Sum: 3133.9]

[Termination (ms): Min: 0.0, Avg: 0.0, Max: 0.0, Diff: 0.0, Sum: 0.3]

[GC Worker Other (ms): Min: 0.0, Avg: 0.1, Max: 0.2, Diff: 0.2, Sum: 1.9]

[GC Worker Total (ms): Min: 143.7, Avg: 144.0, Max: 144.5, Diff: 0.8, Sum: 3313.0]

[GC Worker End (ms): Min: 251320.4, Avg: 251320.5, Max: 251320.6, Diff: 0.2]

[Code Root Fixup: 0.0 ms]

[Clear CT: 6.6 ms]

[Other: 26.8 ms]

[Choose CSet: 0.2 ms]

[Ref Proc: 16.6 ms]

[Ref Enq: 0.9 ms]

[Free CSet: 2.0 ms]

[Eden: 3904.0M(3904.0M)-&amp;gt;0.0B(4448.0M) Survivors: 576.0M-&amp;gt;32.0M Heap: 63.7G(88.0G)-&amp;gt;58.3G(88.0G)]

[Times: user=3.43 sys=0.01, real=0.18 secs]
          </textarea>
         </div>
         <div class="crayon-main" style="">
          <table class="crayon-table">
           <tbody>
            <tr class="crayon-row">
             <td class="crayon-nums " data-settings="show">
              <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
               <div class="crayon-num" data-line="crayon-57686c9c96979838270019-1">
                1
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c96979838270019-2">
                2
               </div>
               <div class="crayon-num" data-line="crayon-57686c9c96979838270019-3">
                3
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c96979838270019-4">
                4
               </div>
               <div class="crayon-num" data-line="crayon-57686c9c96979838270019-5">
                5
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c96979838270019-6">
                6
               </div>
               <div class="crayon-num" data-line="crayon-57686c9c96979838270019-7">
                7
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c96979838270019-8">
                8
               </div>
               <div class="crayon-num" data-line="crayon-57686c9c96979838270019-9">
                9
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c96979838270019-10">
                10
               </div>
               <div class="crayon-num" data-line="crayon-57686c9c96979838270019-11">
                11
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c96979838270019-12">
                12
               </div>
               <div class="crayon-num" data-line="crayon-57686c9c96979838270019-13">
                13
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c96979838270019-14">
                14
               </div>
               <div class="crayon-num" data-line="crayon-57686c9c96979838270019-15">
                15
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c96979838270019-16">
                16
               </div>
               <div class="crayon-num" data-line="crayon-57686c9c96979838270019-17">
                17
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c96979838270019-18">
                18
               </div>
               <div class="crayon-num" data-line="crayon-57686c9c96979838270019-19">
                19
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c96979838270019-20">
                20
               </div>
               <div class="crayon-num" data-line="crayon-57686c9c96979838270019-21">
                21
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c96979838270019-22">
                22
               </div>
               <div class="crayon-num" data-line="crayon-57686c9c96979838270019-23">
                23
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c96979838270019-24">
                24
               </div>
               <div class="crayon-num" data-line="crayon-57686c9c96979838270019-25">
                25
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c96979838270019-26">
                26
               </div>
               <div class="crayon-num" data-line="crayon-57686c9c96979838270019-27">
                27
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c96979838270019-28">
                28
               </div>
               <div class="crayon-num" data-line="crayon-57686c9c96979838270019-29">
                29
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c96979838270019-30">
                30
               </div>
               <div class="crayon-num" data-line="crayon-57686c9c96979838270019-31">
                31
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c96979838270019-32">
                32
               </div>
               <div class="crayon-num" data-line="crayon-57686c9c96979838270019-33">
                33
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c96979838270019-34">
                34
               </div>
               <div class="crayon-num" data-line="crayon-57686c9c96979838270019-35">
                35
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c96979838270019-36">
                36
               </div>
               <div class="crayon-num" data-line="crayon-57686c9c96979838270019-37">
                37
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c96979838270019-38">
                38
               </div>
               <div class="crayon-num" data-line="crayon-57686c9c96979838270019-39">
                39
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c96979838270019-40">
                40
               </div>
               <div class="crayon-num" data-line="crayon-57686c9c96979838270019-41">
                41
               </div>
              </div>
             </td>
             <td class="crayon-code">
              <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
               <div class="crayon-line" id="crayon-57686c9c96979838270019-1">
                <span class="crayon-cn">
                 251.354
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-e">
                 G1Ergonomics
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-e">
                 Mixed
                </span>
                <span class="crayon-v">
                 GCs
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-st">
                 continue
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-e">
                 mixed
                </span>
                <span class="crayon-v">
                 GCs
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 reason
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-e">
                 candidate
                </span>
                <span class="crayon-e">
                 old
                </span>
                <span class="crayon-e">
                 regions
                </span>
                <span class="crayon-v">
                 available
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-e">
                 candidate
                </span>
                <span class="crayon-e">
                 old
                </span>
                <span class="crayon-v">
                 regions
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 363
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 regions
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 reclaimable
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 9830652576
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-e">
                 bytes
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-cn">
                 10.40
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 %
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 threshold
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 10.00
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-o">
                 %
                </span>
                <span class="crayon-sy">
                 ]
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57686c9c96979838270019-2">
               </div>
               <div class="crayon-line" id="crayon-57686c9c96979838270019-3">
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-e">
                 Parallel
                </span>
                <span class="crayon-v">
                 Time
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 145.1
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 ms
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-e">
                 GC
                </span>
                <span class="crayon-v">
                 Workers
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 23
                </span>
                <span class="crayon-sy">
                 ]
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57686c9c96979838270019-4">
               </div>
               <div class="crayon-line" id="crayon-57686c9c96979838270019-5">
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-e">
                 GC
                </span>
                <span class="crayon-e">
                 Worker
                </span>
                <span class="crayon-e">
                 Start
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 ms
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Min
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 251176.0
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Avg
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 251176.4
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Max
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 251176.7
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Diff
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 0.7
                </span>
                <span class="crayon-sy">
                 ]
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57686c9c96979838270019-6">
               </div>
               <div class="crayon-line" id="crayon-57686c9c96979838270019-7">
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-e">
                 Ext
                </span>
                <span class="crayon-e">
                 Root
                </span>
                <span class="crayon-e">
                 Scanning
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 ms
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Min
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 0.8
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Avg
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 1.2
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Max
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 1.7
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Diff
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 0.9
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Sum
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 28.1
                </span>
                <span class="crayon-sy">
                 ]
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57686c9c96979838270019-8">
               </div>
               <div class="crayon-line" id="crayon-57686c9c96979838270019-9">
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-e">
                 Update
                </span>
                <span class="crayon-e">
                 RS
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 ms
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Min
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 0.0
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Avg
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 0.3
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Max
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 0.6
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Diff
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 0.6
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Sum
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 5.8
                </span>
                <span class="crayon-sy">
                 ]
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57686c9c96979838270019-10">
               </div>
               <div class="crayon-line" id="crayon-57686c9c96979838270019-11">
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-e">
                 Processed
                </span>
                <span class="crayon-v">
                 Buffers
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Min
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 0
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Avg
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 1.6
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Max
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 9
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Diff
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 9
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Sum
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 37
                </span>
                <span class="crayon-sy">
                 ]
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57686c9c96979838270019-12">
               </div>
               <div class="crayon-line" id="crayon-57686c9c96979838270019-13">
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-e">
                 Scan
                </span>
                <span class="crayon-e">
                 RS
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 ms
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Min
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 6.0
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Avg
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 6.2
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Max
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 6.3
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Diff
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 0.3
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Sum
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 143.0
                </span>
                <span class="crayon-sy">
                 ]
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57686c9c96979838270019-14">
               </div>
               <div class="crayon-line" id="crayon-57686c9c96979838270019-15">
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-t">
                 Object
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-e">
                 Copy
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 ms
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Min
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 136.2
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Avg
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 136.3
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Max
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 136.4
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Diff
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 0.3
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Sum
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 3133.9
                </span>
                <span class="crayon-sy">
                 ]
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57686c9c96979838270019-16">
               </div>
               <div class="crayon-line" id="crayon-57686c9c96979838270019-17">
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-e">
                 Termination
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 ms
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Min
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 0.0
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Avg
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 0.0
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Max
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 0.0
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Diff
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 0.0
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Sum
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 0.3
                </span>
                <span class="crayon-sy">
                 ]
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57686c9c96979838270019-18">
               </div>
               <div class="crayon-line" id="crayon-57686c9c96979838270019-19">
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-e">
                 GC
                </span>
                <span class="crayon-e">
                 Worker
                </span>
                <span class="crayon-e">
                 Other
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 ms
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Min
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 0.0
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Avg
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 0.1
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Max
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 0.2
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Diff
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 0.2
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Sum
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 1.9
                </span>
                <span class="crayon-sy">
                 ]
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57686c9c96979838270019-20">
               </div>
               <div class="crayon-line" id="crayon-57686c9c96979838270019-21">
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-e">
                 GC
                </span>
                <span class="crayon-e">
                 Worker
                </span>
                <span class="crayon-e">
                 Total
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 ms
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Min
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 143.7
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Avg
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 144.0
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Max
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 144.5
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Diff
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 0.8
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Sum
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 3313.0
                </span>
                <span class="crayon-sy">
                 ]
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57686c9c96979838270019-22">
               </div>
               <div class="crayon-line" id="crayon-57686c9c96979838270019-23">
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-e">
                 GC
                </span>
                <span class="crayon-e">
                 Worker
                </span>
                <span class="crayon-st">
                 End
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 ms
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Min
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 251320.4
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Avg
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 251320.5
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Max
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 251320.6
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Diff
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 0.2
                </span>
                <span class="crayon-sy">
                 ]
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57686c9c96979838270019-24">
               </div>
               <div class="crayon-line" id="crayon-57686c9c96979838270019-25">
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-e">
                 Code
                </span>
                <span class="crayon-e">
                 Root
                </span>
                <span class="crayon-v">
                 Fixup
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 0.0
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 ms
                </span>
                <span class="crayon-sy">
                 ]
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57686c9c96979838270019-26">
               </div>
               <div class="crayon-line" id="crayon-57686c9c96979838270019-27">
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-e">
                 Clear
                </span>
                <span class="crayon-v">
                 CT
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 6.6
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 ms
                </span>
                <span class="crayon-sy">
                 ]
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57686c9c96979838270019-28">
               </div>
               <div class="crayon-line" id="crayon-57686c9c96979838270019-29">
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 Other
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 26.8
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 ms
                </span>
                <span class="crayon-sy">
                 ]
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57686c9c96979838270019-30">
               </div>
               <div class="crayon-line" id="crayon-57686c9c96979838270019-31">
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-e">
                 Choose
                </span>
                <span class="crayon-v">
                 CSet
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 0.2
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 ms
                </span>
                <span class="crayon-sy">
                 ]
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57686c9c96979838270019-32">
               </div>
               <div class="crayon-line" id="crayon-57686c9c96979838270019-33">
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-e">
                 Ref
                </span>
                <span class="crayon-v">
                 Proc
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 16.6
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 ms
                </span>
                <span class="crayon-sy">
                 ]
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57686c9c96979838270019-34">
               </div>
               <div class="crayon-line" id="crayon-57686c9c96979838270019-35">
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-e">
                 Ref
                </span>
                <span class="crayon-v">
                 Enq
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 0.9
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 ms
                </span>
                <span class="crayon-sy">
                 ]
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57686c9c96979838270019-36">
               </div>
               <div class="crayon-line" id="crayon-57686c9c96979838270019-37">
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-e">
                 Free
                </span>
                <span class="crayon-v">
                 CSet
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 2.0
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 ms
                </span>
                <span class="crayon-sy">
                 ]
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57686c9c96979838270019-38">
               </div>
               <div class="crayon-line" id="crayon-57686c9c96979838270019-39">
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 Eden
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 3904.0M
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-cn">
                 3904.0M
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-o">
                 -
                </span>
                <span class="crayon-o">
                 &amp;
                </span>
                <span class="crayon-v">
                 gt
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-cn">
                 0.0B
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-cn">
                 4448.0M
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Survivors
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 576.0M
                </span>
                <span class="crayon-o">
                 -
                </span>
                <span class="crayon-o">
                 &amp;
                </span>
                <span class="crayon-v">
                 gt
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-cn">
                 32.0M
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Heap
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 63.7G
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-cn">
                 88.0G
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-o">
                 -
                </span>
                <span class="crayon-o">
                 &amp;
                </span>
                <span class="crayon-v">
                 gt
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-cn">
                 58.3G
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-cn">
                 88.0G
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-sy">
                 ]
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57686c9c96979838270019-40">
               </div>
               <div class="crayon-line" id="crayon-57686c9c96979838270019-41">
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 Times
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 user
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-cn">
                 3.43
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 sys
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-cn">
                 0.01
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 real
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-cn">
                 0.18
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 secs
                </span>
                <span class="crayon-sy">
                 ]
                </span>
               </div>
              </div>
             </td>
            </tr>
           </tbody>
          </table>
         </div>
        </div>
        <!-- [Format Time: 0.0338 seconds] -->
        <p>
         以G1 GC的一次mixed GC为例，从这段日志中，我们可以看到G1 GC日志的层次是非常清晰的。日志列出了这次暂停发生的时间、原因，并分级各种线程所消耗的时长以及CPU时间的均值和最值。最后，G1 GC列出了本次暂停的清理结果，以及总共消耗的时间。
        </p>
        <p>
         而在我们现在的G1 GC运行日志中，我们明显发现这样一段特殊的日志：
        </p>
        <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
        <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-57686c9c9698b660391610" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
         <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <span class="crayon-title">
          </span>
          <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
           <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-wrap-button" title="切换自动换行">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-expand-button" title="点击展开代码">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-copy-button" title="复制代码">
            <div class="crayon-button-icon">
            </div>
           </div>
           <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
            <div class="crayon-button-icon">
            </div>
           </div>
          </div>
         </div>
         <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
         </div>
         <div class="crayon-plain-wrap">
          <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
           (to-space exhausted), 1.0552680 secs]

[Parallel Time: 958.8 ms, GC Workers: 23]

[GC Worker Start (ms): Min: 759925.0, Avg: 759925.1, Max: 759925.3, Diff: 0.3]

[Ext Root Scanning (ms): Min: 1.1, Avg: 1.4, Max: 1.8, Diff: 0.6, Sum: 33.0]

[SATB Filtering (ms): Min: 0.0, Avg: 0.0, Max: 0.3, Diff: 0.3, Sum: 0.3]

[Update RS (ms): Min: 0.0, Avg: 1.2, Max: 2.1, Diff: 2.1, Sum: 26.9]

[Processed Buffers: Min: 0, Avg: 2.8, Max: 11, Diff: 11, Sum: 65]

[Scan RS (ms): Min: 1.6, Avg: 2.5, Max: 3.0, Diff: 1.4, Sum: 58.0]

[Object Copy (ms): Min: 952.5, Avg: 953.0, Max: 954.3, Diff: 1.7, Sum: 21919.4]

[Termination (ms): Min: 0.0, Avg: 0.1, Max: 0.2, Diff: 0.2, Sum: 2.2]

[GC Worker Other (ms): Min: 0.0, Avg: 0.0, Max: 0.0, Diff: 0.0, Sum: 0.6]

[GC Worker Total (ms): Min: 958.1, Avg: 958.3, Max: 958.4, Diff: 0.3, Sum: 22040.4]

[GC Worker End (ms): Min: 760883.4, Avg: 760883.4, Max: 760883.4, Diff: 0.0]

[Code Root Fixup: 0.0 ms]

[Clear CT: 0.4 ms]

[Other: 96.0 ms]

[Choose CSet: 0.0 ms]

[Ref Proc: 0.4 ms]

[Ref Enq: 0.0 ms]

[Free CSet: 0.1 ms]

[Eden: 160.0M(3904.0M)-&amp;gt;0.0B(4480.0M) Survivors: 576.0M-&amp;gt;0.0B Heap: 87.7G(88.0G)-&amp;gt;87.7G(88.0G)]

[Times: user=1.69 sys=0.24, real=1.05 secs]

760.981: [G1Ergonomics (Heap Sizing) attempt heap expansion, reason: allocation request failed, allocation request: 90128 bytes]

760.981: [G1Ergonomics (Heap Sizing) expand the heap, requested expansion amount: 33554432 bytes, attempted expansion amount: 33554432 bytes]

760.981: [G1Ergonomics (Heap Sizing) did not expand the heap, reason: heap expansion operation failed]

760.981: [Full GC 87G-&amp;gt;36G(88G), 67.4381220 secs]
          </textarea>
         </div>
         <div class="crayon-main" style="">
          <table class="crayon-table">
           <tbody>
            <tr class="crayon-row">
             <td class="crayon-nums " data-settings="show">
              <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
               <div class="crayon-num" data-line="crayon-57686c9c9698b660391610-1">
                1
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c9698b660391610-2">
                2
               </div>
               <div class="crayon-num" data-line="crayon-57686c9c9698b660391610-3">
                3
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c9698b660391610-4">
                4
               </div>
               <div class="crayon-num" data-line="crayon-57686c9c9698b660391610-5">
                5
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c9698b660391610-6">
                6
               </div>
               <div class="crayon-num" data-line="crayon-57686c9c9698b660391610-7">
                7
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c9698b660391610-8">
                8
               </div>
               <div class="crayon-num" data-line="crayon-57686c9c9698b660391610-9">
                9
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c9698b660391610-10">
                10
               </div>
               <div class="crayon-num" data-line="crayon-57686c9c9698b660391610-11">
                11
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c9698b660391610-12">
                12
               </div>
               <div class="crayon-num" data-line="crayon-57686c9c9698b660391610-13">
                13
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c9698b660391610-14">
                14
               </div>
               <div class="crayon-num" data-line="crayon-57686c9c9698b660391610-15">
                15
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c9698b660391610-16">
                16
               </div>
               <div class="crayon-num" data-line="crayon-57686c9c9698b660391610-17">
                17
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c9698b660391610-18">
                18
               </div>
               <div class="crayon-num" data-line="crayon-57686c9c9698b660391610-19">
                19
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c9698b660391610-20">
                20
               </div>
               <div class="crayon-num" data-line="crayon-57686c9c9698b660391610-21">
                21
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c9698b660391610-22">
                22
               </div>
               <div class="crayon-num" data-line="crayon-57686c9c9698b660391610-23">
                23
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c9698b660391610-24">
                24
               </div>
               <div class="crayon-num" data-line="crayon-57686c9c9698b660391610-25">
                25
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c9698b660391610-26">
                26
               </div>
               <div class="crayon-num" data-line="crayon-57686c9c9698b660391610-27">
                27
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c9698b660391610-28">
                28
               </div>
               <div class="crayon-num" data-line="crayon-57686c9c9698b660391610-29">
                29
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c9698b660391610-30">
                30
               </div>
               <div class="crayon-num" data-line="crayon-57686c9c9698b660391610-31">
                31
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c9698b660391610-32">
                32
               </div>
               <div class="crayon-num" data-line="crayon-57686c9c9698b660391610-33">
                33
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c9698b660391610-34">
                34
               </div>
               <div class="crayon-num" data-line="crayon-57686c9c9698b660391610-35">
                35
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c9698b660391610-36">
                36
               </div>
               <div class="crayon-num" data-line="crayon-57686c9c9698b660391610-37">
                37
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c9698b660391610-38">
                38
               </div>
               <div class="crayon-num" data-line="crayon-57686c9c9698b660391610-39">
                39
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c9698b660391610-40">
                40
               </div>
               <div class="crayon-num" data-line="crayon-57686c9c9698b660391610-41">
                41
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c9698b660391610-42">
                42
               </div>
               <div class="crayon-num" data-line="crayon-57686c9c9698b660391610-43">
                43
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c9698b660391610-44">
                44
               </div>
               <div class="crayon-num" data-line="crayon-57686c9c9698b660391610-45">
                45
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c9698b660391610-46">
                46
               </div>
               <div class="crayon-num" data-line="crayon-57686c9c9698b660391610-47">
                47
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c9698b660391610-48">
                48
               </div>
               <div class="crayon-num" data-line="crayon-57686c9c9698b660391610-49">
                49
               </div>
               <div class="crayon-num crayon-striped-num" data-line="crayon-57686c9c9698b660391610-50">
                50
               </div>
               <div class="crayon-num" data-line="crayon-57686c9c9698b660391610-51">
                51
               </div>
              </div>
             </td>
             <td class="crayon-code">
              <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
               <div class="crayon-line" id="crayon-57686c9c9698b660391610-1">
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-st">
                 to
                </span>
                <span class="crayon-o">
                 -
                </span>
                <span class="crayon-e">
                 space
                </span>
                <span class="crayon-v">
                 exhausted
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 1.0552680
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 secs
                </span>
                <span class="crayon-sy">
                 ]
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57686c9c9698b660391610-2">
               </div>
               <div class="crayon-line" id="crayon-57686c9c9698b660391610-3">
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-e">
                 Parallel
                </span>
                <span class="crayon-v">
                 Time
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 958.8
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 ms
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-e">
                 GC
                </span>
                <span class="crayon-v">
                 Workers
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 23
                </span>
                <span class="crayon-sy">
                 ]
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57686c9c9698b660391610-4">
               </div>
               <div class="crayon-line" id="crayon-57686c9c9698b660391610-5">
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-e">
                 GC
                </span>
                <span class="crayon-e">
                 Worker
                </span>
                <span class="crayon-e">
                 Start
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 ms
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Min
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 759925.0
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Avg
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 759925.1
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Max
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 759925.3
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Diff
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 0.3
                </span>
                <span class="crayon-sy">
                 ]
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57686c9c9698b660391610-6">
               </div>
               <div class="crayon-line" id="crayon-57686c9c9698b660391610-7">
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-e">
                 Ext
                </span>
                <span class="crayon-e">
                 Root
                </span>
                <span class="crayon-e">
                 Scanning
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 ms
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Min
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 1.1
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Avg
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 1.4
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Max
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 1.8
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Diff
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 0.6
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Sum
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 33.0
                </span>
                <span class="crayon-sy">
                 ]
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57686c9c9698b660391610-8">
               </div>
               <div class="crayon-line" id="crayon-57686c9c9698b660391610-9">
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-e">
                 SATB
                </span>
                <span class="crayon-e">
                 Filtering
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 ms
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Min
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 0.0
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Avg
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 0.0
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Max
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 0.3
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Diff
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 0.3
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Sum
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 0.3
                </span>
                <span class="crayon-sy">
                 ]
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57686c9c9698b660391610-10">
               </div>
               <div class="crayon-line" id="crayon-57686c9c9698b660391610-11">
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-e">
                 Update
                </span>
                <span class="crayon-e">
                 RS
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 ms
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Min
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 0.0
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Avg
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 1.2
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Max
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 2.1
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Diff
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 2.1
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Sum
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 26.9
                </span>
                <span class="crayon-sy">
                 ]
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57686c9c9698b660391610-12">
               </div>
               <div class="crayon-line" id="crayon-57686c9c9698b660391610-13">
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-e">
                 Processed
                </span>
                <span class="crayon-v">
                 Buffers
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Min
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 0
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Avg
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 2.8
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Max
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 11
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Diff
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 11
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Sum
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 65
                </span>
                <span class="crayon-sy">
                 ]
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57686c9c9698b660391610-14">
               </div>
               <div class="crayon-line" id="crayon-57686c9c9698b660391610-15">
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-e">
                 Scan
                </span>
                <span class="crayon-e">
                 RS
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 ms
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Min
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 1.6
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Avg
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 2.5
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Max
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 3.0
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Diff
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 1.4
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Sum
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 58.0
                </span>
                <span class="crayon-sy">
                 ]
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57686c9c9698b660391610-16">
               </div>
               <div class="crayon-line" id="crayon-57686c9c9698b660391610-17">
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-t">
                 Object
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-e">
                 Copy
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 ms
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Min
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 952.5
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Avg
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 953.0
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Max
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 954.3
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Diff
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 1.7
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Sum
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 21919.4
                </span>
                <span class="crayon-sy">
                 ]
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57686c9c9698b660391610-18">
               </div>
               <div class="crayon-line" id="crayon-57686c9c9698b660391610-19">
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-e">
                 Termination
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 ms
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Min
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 0.0
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Avg
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 0.1
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Max
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 0.2
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Diff
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 0.2
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Sum
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 2.2
                </span>
                <span class="crayon-sy">
                 ]
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57686c9c9698b660391610-20">
               </div>
               <div class="crayon-line" id="crayon-57686c9c9698b660391610-21">
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-e">
                 GC
                </span>
                <span class="crayon-e">
                 Worker
                </span>
                <span class="crayon-e">
                 Other
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 ms
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Min
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 0.0
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Avg
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 0.0
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Max
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 0.0
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Diff
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 0.0
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Sum
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 0.6
                </span>
                <span class="crayon-sy">
                 ]
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57686c9c9698b660391610-22">
               </div>
               <div class="crayon-line" id="crayon-57686c9c9698b660391610-23">
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-e">
                 GC
                </span>
                <span class="crayon-e">
                 Worker
                </span>
                <span class="crayon-e">
                 Total
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 ms
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Min
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 958.1
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Avg
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 958.3
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Max
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 958.4
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Diff
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 0.3
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Sum
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 22040.4
                </span>
                <span class="crayon-sy">
                 ]
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57686c9c9698b660391610-24">
               </div>
               <div class="crayon-line" id="crayon-57686c9c9698b660391610-25">
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-e">
                 GC
                </span>
                <span class="crayon-e">
                 Worker
                </span>
                <span class="crayon-st">
                 End
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-v">
                 ms
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Min
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 760883.4
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Avg
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 760883.4
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Max
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 760883.4
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Diff
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 0.0
                </span>
                <span class="crayon-sy">
                 ]
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57686c9c9698b660391610-26">
               </div>
               <div class="crayon-line" id="crayon-57686c9c9698b660391610-27">
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-e">
                 Code
                </span>
                <span class="crayon-e">
                 Root
                </span>
                <span class="crayon-v">
                 Fixup
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 0.0
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 ms
                </span>
                <span class="crayon-sy">
                 ]
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57686c9c9698b660391610-28">
               </div>
               <div class="crayon-line" id="crayon-57686c9c9698b660391610-29">
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-e">
                 Clear
                </span>
                <span class="crayon-v">
                 CT
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 0.4
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 ms
                </span>
                <span class="crayon-sy">
                 ]
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57686c9c9698b660391610-30">
               </div>
               <div class="crayon-line" id="crayon-57686c9c9698b660391610-31">
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 Other
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 96.0
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 ms
                </span>
                <span class="crayon-sy">
                 ]
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57686c9c9698b660391610-32">
               </div>
               <div class="crayon-line" id="crayon-57686c9c9698b660391610-33">
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-e">
                 Choose
                </span>
                <span class="crayon-v">
                 CSet
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 0.0
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 ms
                </span>
                <span class="crayon-sy">
                 ]
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57686c9c9698b660391610-34">
               </div>
               <div class="crayon-line" id="crayon-57686c9c9698b660391610-35">
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-e">
                 Ref
                </span>
                <span class="crayon-v">
                 Proc
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 0.4
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 ms
                </span>
                <span class="crayon-sy">
                 ]
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57686c9c9698b660391610-36">
               </div>
               <div class="crayon-line" id="crayon-57686c9c9698b660391610-37">
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-e">
                 Ref
                </span>
                <span class="crayon-v">
                 Enq
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 0.0
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 ms
                </span>
                <span class="crayon-sy">
                 ]
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57686c9c9698b660391610-38">
               </div>
               <div class="crayon-line" id="crayon-57686c9c9698b660391610-39">
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-e">
                 Free
                </span>
                <span class="crayon-v">
                 CSet
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 0.1
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 ms
                </span>
                <span class="crayon-sy">
                 ]
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57686c9c9698b660391610-40">
               </div>
               <div class="crayon-line" id="crayon-57686c9c9698b660391610-41">
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 Eden
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 160.0M
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-cn">
                 3904.0M
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-o">
                 -
                </span>
                <span class="crayon-o">
                 &amp;
                </span>
                <span class="crayon-v">
                 gt
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-cn">
                 0.0B
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-cn">
                 4480.0M
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Survivors
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 576.0M
                </span>
                <span class="crayon-o">
                 -
                </span>
                <span class="crayon-o">
                 &amp;
                </span>
                <span class="crayon-v">
                 gt
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-cn">
                 0.0B
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 Heap
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 87.7G
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-cn">
                 88.0G
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-o">
                 -
                </span>
                <span class="crayon-o">
                 &amp;
                </span>
                <span class="crayon-v">
                 gt
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-cn">
                 87.7G
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-cn">
                 88.0G
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-sy">
                 ]
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57686c9c9698b660391610-42">
               </div>
               <div class="crayon-line" id="crayon-57686c9c9698b660391610-43">
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-v">
                 Times
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 user
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-cn">
                 1.69
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 sys
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-cn">
                 0.24
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 real
                </span>
                <span class="crayon-o">
                 =
                </span>
                <span class="crayon-cn">
                 1.05
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 secs
                </span>
                <span class="crayon-sy">
                 ]
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57686c9c9698b660391610-44">
               </div>
               <div class="crayon-line" id="crayon-57686c9c9698b660391610-45">
                <span class="crayon-cn">
                 760.981
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-e">
                 G1Ergonomics
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-e">
                 Heap
                </span>
                <span class="crayon-v">
                 Sizing
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-e">
                 attempt
                </span>
                <span class="crayon-e">
                 heap
                </span>
                <span class="crayon-v">
                 expansion
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 reason
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-e">
                 allocation
                </span>
                <span class="crayon-e">
                 request
                </span>
                <span class="crayon-v">
                 failed
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-e">
                 allocation
                </span>
                <span class="crayon-v">
                 request
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 90128
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 bytes
                </span>
                <span class="crayon-sy">
                 ]
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57686c9c9698b660391610-46">
               </div>
               <div class="crayon-line" id="crayon-57686c9c9698b660391610-47">
                <span class="crayon-cn">
                 760.981
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-e">
                 G1Ergonomics
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-e">
                 Heap
                </span>
                <span class="crayon-v">
                 Sizing
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-e">
                 expand
                </span>
                <span class="crayon-e">
                 the
                </span>
                <span class="crayon-v">
                 heap
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-e">
                 requested
                </span>
                <span class="crayon-e">
                 expansion
                </span>
                <span class="crayon-v">
                 amount
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 33554432
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 bytes
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-e">
                 attempted
                </span>
                <span class="crayon-e">
                 expansion
                </span>
                <span class="crayon-v">
                 amount
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 33554432
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 bytes
                </span>
                <span class="crayon-sy">
                 ]
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57686c9c9698b660391610-48">
               </div>
               <div class="crayon-line" id="crayon-57686c9c9698b660391610-49">
                <span class="crayon-cn">
                 760.981
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-e">
                 G1Ergonomics
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-e">
                 Heap
                </span>
                <span class="crayon-v">
                 Sizing
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-e">
                 did
                </span>
                <span class="crayon-st">
                 not
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-e">
                 expand
                </span>
                <span class="crayon-e">
                 the
                </span>
                <span class="crayon-v">
                 heap
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 reason
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-e">
                 heap
                </span>
                <span class="crayon-e">
                 expansion
                </span>
                <span class="crayon-e">
                 operation
                </span>
                <span class="crayon-v">
                 failed
                </span>
                <span class="crayon-sy">
                 ]
                </span>
               </div>
               <div class="crayon-line crayon-striped-line" id="crayon-57686c9c9698b660391610-50">
               </div>
               <div class="crayon-line" id="crayon-57686c9c9698b660391610-51">
                <span class="crayon-cn">
                 760.981
                </span>
                <span class="crayon-o">
                 :
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-sy">
                 [
                </span>
                <span class="crayon-e">
                 Full
                </span>
                <span class="crayon-i">
                 GC
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 87G
                </span>
                <span class="crayon-o">
                 -
                </span>
                <span class="crayon-o">
                 &amp;
                </span>
                <span class="crayon-v">
                 gt
                </span>
                <span class="crayon-sy">
                 ;
                </span>
                <span class="crayon-cn">
                 36G
                </span>
                <span class="crayon-sy">
                 (
                </span>
                <span class="crayon-cn">
                 88G
                </span>
                <span class="crayon-sy">
                 )
                </span>
                <span class="crayon-sy">
                 ,
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-cn">
                 67.4381220
                </span>
                <span class="crayon-h">
                </span>
                <span class="crayon-v">
                 secs
                </span>
                <span class="crayon-sy">
                 ]
                </span>
               </div>
              </div>
             </td>
            </tr>
           </tbody>
          </table>
         </div>
        </div>
        <!-- [Format Time: 0.0230 seconds] -->
        <p>
         显然最大的性能下降是这样的Full GC导致的，我们可以在日志中看到类似To-space Exhausted或者To-space Overflow这样的输出（取决于不同版本的JVM，输出略有不同）。这是G1 GC收集器在将某个需要垃圾回收的分区进行回收时，无法找到一个能将其中存活对象拷贝过去的空闲分区。这种情况被称为Evacuation Failure，常常会引发Full GC。而且很显然，G1 GC的Full GC效率相对于Parallel GC实在是相差太远，我们想要获得比Parallel GC更好的表现，一定要尽力规避Full GC的出现。对于这种情况，我们常见的处理办法有两种：
        </p>
        <ol>
         <li>
          将InitiatingHeapOccupancyPercent参数调低（默认值是45），可以使G1 GC收集器更早开始Mixed GC；但另一方面，会增加GC发生频率。
         </li>
         <li>
          提高ConcGCThreads的值，在Mixed GC阶段投入更多的并发线程，争取提高每次暂停的效率。但是此参数会占用一定的有效工作线程资源。
         </li>
        </ol>
        <p>
         调试这两个参数可以有效降低Full GC出现的概率。Full GC被消除之后，最终的性能获得了大幅提升。但是我们发现，仍然有一些地方GC产生了大量的暂停时间。比如，我们在日志中读到很多类似这样的片断：
        </p>
        <blockquote>
         <p>
          280.008: [G1Ergonomics (Concurrent Cycles) request concurrent cycle initiation, reason: occupancy higher than threshold, occupancy: 62344134656 bytes, allocation request: 46137368 bytes, threshold: 42520176225 bytes (45.00 %), source: concurrent humongous allocation]
         </p>
        </blockquote>
        <p>
         这里就是Humongous object，一些比G1的一个分区的一半更大的对象。对于这些对象，G1会专门在Heap上开出一个个Humongous Area来存放，每个分区只放一个对象。但是申请这么大的空间是比较耗时的，而且这些区域也仅当Full GC时才进行处理，所以我们要尽量减少这样的对象产生。或者提高G1HeapRegionSize的值减少HumongousArea的创建。不过在内存比较大的时，JVM默认把这个值设到了最大(32M)，此时我们只能通过分析程序本身找到这些对象并且尽量减少这样的对象产生。当然，相信随着G1 GC的发展，在后期的版本中相信这个最大值也会越来越大，毕竟G1号称是在1024～2048个Region时能够获得最佳性能。
        </p>
        <p>
         接下来，我们可以分析一下单次cycle start到Mixed GC为止的时间间隔。如果这一时间过长，可以考虑进一步提升ConcGCThreads，需要注意的是，这会进一步占用一定CPU资源。
        </p>
        <p>
         对于追求更短暂停时间的在线应用，如果观测到较长的Mixed GC pause，我们还要把G1RSetUpdatingPauseTimePercent调低，把G1ConcRefinementThreads调高。前文提到G1 GC通过为每个分区维护RememberSet来记录分区外对分区内的引用，G1RSetUpdatingPauseTimePercent则正是在STW阶段为G1收集器指定更新RememberSet的时间占总STW时间的期望比例，默认为10。而G1ConcRefinementThreads则是在程序运行时维护RememberSet的线程数目。通过对这两个值的对应调整，我们可以把STW阶段的RememberSet更新工作压力更多地移到Concurrent阶段。
        </p>
        <p>
         另外，对于需要长时间运行的应用，我们不妨加上AlwaysPreTouch参数，这样JVM会在启动时就向OS申请所有需要使用的内存，避免动态申请，也可以提高运行时性能。但是该参数也会大大延长启动时间。
        </p>
        <p>
         最终，经过几轮GC参数调试，其结果如下表5所示。较之先前的结果，我们最终还是获得了较满意的运行效率。
        </p>
        <table>
         <tbody>
          <tr>
           <td>
            <b>
             Configuration Options
            </b>
           </td>
           <td>
            <code>
             -XX:+UseG1GC -XX:+PrintFlagsFinal -XX:+PrintReferenceGC -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintAdaptiveSizePolicy -XX:+UnlockDiagnosticVMOptions -XX:+G1SummarizeConcMark -Xms88g -Xmx88g -XX:InitiatingHeapOccupancyPercent=35 -XX:ConcGCThread=20
            </code>
           </td>
          </tr>
          <tr>
           <td>
            <b>
             Stage*
            </b>
           </td>
           <td>
            <img src="http://dataunion.org/wp-content/uploads/2015/06/Screen-Shot-2015-05-26-at-3.20.31-PM.png"/>
           </td>
          </tr>
          <tr>
           <td>
            <b>
             Task*
            </b>
           </td>
           <td>
            <img src="http://dataunion.org/wp-content/uploads/2015/06/Screen-Shot-2015-05-26-at-3.21.36-PM.png"/>
           </td>
          </tr>
          <tr>
           <td>
            <b>
             CPU*
            </b>
           </td>
           <td>
            <img src="http://dataunion.org/wp-content/uploads/2015/06/Screen-Shot-2015-05-26-at-3.22.13-PM.png"/>
           </td>
          </tr>
          <tr>
           <td>
            <b>
             Mem*
            </b>
           </td>
           <td>
            <img src="http://dataunion.org/wp-content/uploads/2015/06/Screen-Shot-2015-05-26-at-3.22.45-PM.png"/>
           </td>
          </tr>
         </tbody>
        </table>
        <p>
         <b>
          表 5 使用G1 GC调优完成后的表现
         </b>
        </p>
        <p>
         <b>
          小结：
         </b>
         综合考虑G1 GC是较为推崇的默认Spark GC机制。进一步的GC日志分析，可以收获更多的GC优化。经过上面的调优过程，我们将该应用的运行时间缩短到了4.3分钟，相比调优之前，我们获得了1.7倍左右的性能提升，而相比Parallel GC也获得了1.5倍左右的性能提升。
        </p>
        <h3>
         总结
        </h3>
        <p>
         对于大量依赖于内存计算的Spark应用，GC调优显得尤为重要。在发现GC问题的时候，不要着急调试GC。而是先考虑是否存在Spark进程内存管理的效率问题，例如RDD缓存的持久化和释放。至于GC参数的调试，首先我们比较推荐使用G1 GC来运行Spark应用。相较于传统的垃圾收集器，随着G1的不断成熟，需要配置的选项会更少，能同时满足高吞吐量和低延迟的寻求。当然，GC的调优不是绝对的，不同的应用会有不同应用的特性，掌握根据GC日志进行调优的方法，才能以不变应万变。最后，也不能忘了先对程序本身的逻辑和代码编写进行考量，例如减少中间变量的创建或者复制，控制大对象的创建，将长期存活对象放在Off-heap中等等。
        </p>
       </div>
      </div>
      <div>
       <strong>
        注：转载文章均来自于公开网络，仅供学习使用，不会用于任何商业用途，如果侵犯到原作者的权益，请您与我们联系删除或者授权事宜，联系邮箱：contact@dataunion.org。转载数盟网站文章请注明原文章作者，否则产生的任何版权纠纷与数盟无关。
       </strong>
      </div>
      <!--content_text-->
      <div class="fenxian">
       <!-- JiaThis Button BEGIN -->
       <div class="jiathis_style_32x32">
        <p class="jiathis_button_weixin">
        </p>
        <p class="jiathis_button_tsina">
        </p>
        <p class="jiathis_button_qzone">
        </p>
        <p class="jiathis_button_cqq">
        </p>
        <p class="jiathis_button_tumblr">
        </p>
        <a class="jiathis jiathis_txt jtico jtico_jiathis" href="http://www.jiathis.com/share" target="_blank">
        </a>
        <p class="jiathis_counter_style">
        </p>
       </div>
       <!-- JiaThis Button END -->
      </div>
     </article>
     <!--content-->
     <!--相关文章-->
     <div class="xianguan">
      <div class="xianguantitle">
       相关文章！
      </div>
      <ul class="pic">
       <li>
        <a href="http://dataunion.org/20824.html">
         <img src="http://dataunion.org/wp-content/uploads/2015/09/t018630756a7e263b33-300x165.jpg"/>
        </a>
        <a class="link" href="http://dataunion.org/20824.html" rel="bookmark" title="如何判断一笔交易是否属于欺诈？你只是需要一点数据挖掘">
         如何判断一笔交易是否属于欺诈？你只是需要一点数据挖掘
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/20820.html">
         <img src="http://dataunion.org/wp-content/uploads/2015/09/1-300x200.jpg"/>
        </a>
        <a class="link" href="http://dataunion.org/20820.html" rel="bookmark" title="人们对Python在企业级开发中的10大误解">
         人们对Python在企业级开发中的10大误解
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/20811.html">
         <img src="http://dataunion.org/wp-content/uploads/2015/09/t0133fcacae8523307b_副本-300x200.jpg"/>
        </a>
        <a class="link" href="http://dataunion.org/20811.html" rel="bookmark" title="大神亲传：26条深度学习的金科玉律！">
         大神亲传：26条深度学习的金科玉律！
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/20808.html">
         <img src="http://dataunion.org/wp-content/uploads/2015/09/640.webp-11-300x137.jpg"/>
        </a>
        <a class="link" href="http://dataunion.org/20808.html" rel="bookmark" title="我们是如何在一张地图上表现86万个数据的">
         我们是如何在一张地图上表现86万个数据的
        </a>
       </li>
      </ul>
     </div>
     <!--相关文章-->
     <div class="comment" id="comments">
      <!-- You can start editing here. -->
      <!-- If comments are open, but there are no comments. -->
      <div class="title">
       期待你一针见血的评论，Come on！
      </div>
      <div id="respond">
       <p>
        不用想啦，马上
        <a href="http://dataunion.org/wp-login.php?redirect_to=http%3A%2F%2Fdataunion.org%2F19227.html">
         "登录"
        </a>
        发表自已的想法.
       </p>
      </div>
     </div>
     <!-- .nav-single -->
    </div>
    <!--Container End-->
    <aside id="sitebar">
     <div class="sitebar_list2">
      <div class="wptag">
       <span class="tagtitle">
        热门标签+
       </span>
       <div class="tagg">
        <ul class="menu" id="menu-%e5%8f%8b%e6%83%85%e9%93%be%e6%8e%a5">
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-1605" id="menu-item-1605">
          <a href="http://taidizh.com/">
           泰迪智慧
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-20884" id="menu-item-20884">
          <a href="http://www.transwarp.cn/">
           星环科技
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-3538" id="menu-item-3538">
          <a href="http://datall.org/">
           珈和遥感
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-20888" id="menu-item-20888">
          <a href="http://www.chinahadoop.cn/">
           小象学院
          </a>
         </li>
        </ul>
       </div>
      </div>
     </div>
     <div class="sitebar_list">
      <div class="textwidget">
       <div align="center">
        <a href="http://study.163.com/course/courseMain.htm?courseId=991022" target="_blank">
         <img src="http://dataunion.org/wp-content/uploads/2016/03/dv.jpg"/>
        </a>
       </div>
      </div>
     </div>
     <div class="sitebar_list">
      <h4 class="sitebar_title">
       文章分类
      </h4>
      <div class="tagcloud">
       <a class="tag-link-44" href="http://dataunion.org/category/industry/demo" style="font-size: 10.204724409449pt;" title="4个话题">
        Demo展示
       </a>
       <a class="tag-link-31" href="http://dataunion.org/category/experts" style="font-size: 15.826771653543pt;" title="52个话题">
        专家团队
       </a>
       <a class="tag-link-870" href="http://dataunion.org/category/tech/ai" style="font-size: 19.795275590551pt;" title="273个话题">
        人工智能
       </a>
       <a class="tag-link-488" href="http://dataunion.org/category/%e5%8a%a0%e5%85%a5%e6%95%b0%e7%9b%9f" style="font-size: 8pt;" title="1个话题">
        加入数盟
       </a>
       <a class="tag-link-869" href="http://dataunion.org/category/tech/viz" style="font-size: 17.204724409449pt;" title="93个话题">
        可视化
       </a>
       <a class="tag-link-30" href="http://dataunion.org/category/partners" style="font-size: 10.645669291339pt;" title="5个话题">
        合作伙伴
       </a>
       <a class="tag-link-889" href="http://dataunion.org/category/parterc" style="font-size: 11.582677165354pt;" title="8个话题">
        合作会议
       </a>
       <a class="tag-link-104" href="http://dataunion.org/category/books" style="font-size: 12.96062992126pt;" title="15个话题">
        图书
       </a>
       <a class="tag-link-220" href="http://dataunion.org/category/tech/base" style="font-size: 19.850393700787pt;" title="281个话题">
        基础架构
       </a>
       <a class="tag-link-219" href="http://dataunion.org/category/tech/analysis" style="font-size: 19.409448818898pt;" title="232个话题">
        数据分析
       </a>
       <a class="tag-link-887" href="http://dataunion.org/category/tech/dm" style="font-size: 13.291338582677pt;" title="17个话题">
        数据挖掘
       </a>
       <a class="tag-link-34" href="http://dataunion.org/category/tech" style="font-size: 20.732283464567pt;" title="404个话题">
        文章
       </a>
       <a class="tag-link-1" href="http://dataunion.org/category/uncategorized" style="font-size: 22pt;" title="693个话题">
        未分类
       </a>
       <a class="tag-link-4" href="http://dataunion.org/category/events" style="font-size: 14.503937007874pt;" title="29个话题">
        活动
       </a>
       <a class="tag-link-890" href="http://dataunion.org/category/tech/%e6%b7%b1%e5%ba%a6%e5%ad%a6%e4%b9%a0" style="font-size: 10.204724409449pt;" title="4个话题">
        深度学习
       </a>
       <a class="tag-link-221" href="http://dataunion.org/category/tech/devl" style="font-size: 18.968503937008pt;" title="193个话题">
        编程语言
       </a>
       <a class="tag-link-888" href="http://dataunion.org/category/career" style="font-size: 15.661417322835pt;" title="48个话题">
        职业规划
       </a>
       <a class="tag-link-5" href="http://dataunion.org/category/jobs" style="font-size: 14.11811023622pt;" title="25个话题">
        职位
       </a>
       <a class="tag-link-871" href="http://dataunion.org/category/industry" style="font-size: 15.716535433071pt;" title="49个话题">
        行业
       </a>
       <a class="tag-link-613" href="http://dataunion.org/category/industry/case" style="font-size: 16.984251968504pt;" title="84个话题">
        行业应用
       </a>
       <a class="tag-link-885" href="http://dataunion.org/category/industry/news" style="font-size: 17.425196850394pt;" title="102个话题">
        行业资讯
       </a>
       <a class="tag-link-10" href="http://dataunion.org/category/training" style="font-size: 14.228346456693pt;" title="26个话题">
        课程
       </a>
       <a class="tag-link-16" href="http://dataunion.org/category/sources" style="font-size: 15.661417322835pt;" title="48个话题">
        资源
       </a>
      </div>
     </div>
     <div class="sitebar_list">
      <h4 class="sitebar_title">
       功能
      </h4>
      <ul>
       <li>
        <a href="http://dataunion.org/wp-login.php?action=register">
         注册
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/wp-login.php">
         登录
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/feed">
         文章
         <abbr title="Really Simple Syndication">
          RSS
         </abbr>
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/comments/feed">
         评论
         <abbr title="Really Simple Syndication">
          RSS
         </abbr>
        </a>
       </li>
       <li>
        <a href="https://cn.wordpress.org/" title="基于WordPress，一个优美、先进的个人信息发布平台。">
         WordPress.org
        </a>
       </li>
      </ul>
     </div>
    </aside>
    <div class="clear">
    </div>
   </div>
   <!--main-->
   ﻿
   <footer id="dibu">
    <div class="about">
     <div class="right">
      <ul class="menu" id="menu-%e5%ba%95%e9%83%a8%e8%8f%9c%e5%8d%95">
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-18024" id="menu-item-18024">
        <a href="http://dataunion.org/category/partners">
         合作伙伴
        </a>
       </li>
       <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-20881" id="menu-item-20881">
        <a href="http://dataunion.org/contribute">
         文章投稿
        </a>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-20872" id="menu-item-20872">
        <a href="http://dataunion.org/category/%e5%8a%a0%e5%85%a5%e6%95%b0%e7%9b%9f">
         加入数盟
        </a>
       </li>
       <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-22441" id="menu-item-22441">
        <a href="http://dataunion.org/f-links">
         友情链接
        </a>
       </li>
       <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-20874" id="menu-item-20874">
        <a href="http://dataunion.org/aboutus">
         关于数盟
        </a>
       </li>
      </ul>
      <p class="banquan">
       数盟社区        ，
        做最棒的数据科学社区
      </p>
     </div>
     <div class="left">
      <ul class="bottomlist">
       <li>
        <a href="http://weibo.com/DataScientistUnion  " target="_blank" 　title="">
         <img src="http://dataunion.org/wp-content/themes/yzipi/images/weibo.png"/>
        </a>
       </li>
       <li>
        <a class="cd-popup-trigger" href="http://dataunion.org/19227.html#0">
         <img src="http://dataunion.org/wp-content/themes/yzipi/images/weixin.png"/>
        </a>
       </li>
      </ul>
      <div class="cd-popup">
       <div class="cd-popup-container">
        <h1>
         扫描二维码,加微信公众号
        </h1>
        <img src="http://dataunion.org/wp-content/themes/yzipi/images/2014-12-06-1515289049.png"/>
        <a class="cd-popup-close" href="http://dataunion.org/19227.html">
        </a>
       </div>
       <!-- cd-popup-container -->
      </div>
      <!-- cd-popup -->
     </div>
    </div>
    <!--about-->
    <div class="bottom">
     <a href="http://dataunion.org/">
      数盟社区
     </a>
     <a href="http://www.miitbeian.gov.cn/" rel="external nofollow" target="_blank">
      京ICP备14026740号
     </a>
     联系我们：
     <a href="mailto:contact@dataunion.org" target="_blank">
      contact@dataunion.org
     </a>
     <div class="tongji">
     </div>
     <!--bottom-->
     <div class="scroll" id="scroll" style="display:none;">
      ︿
     </div>
    </div>
   </footer>
   <!--dibu-->
  </div>
 </body>
</html>